Skip to content

Add the Tokamak CLI and local plugin index - #253

Closed
JustKira wants to merge 15 commits into
feat/tkm-166-plugin-typesfrom
feat/tkm-167-cli
Closed

JustKira wants to merge 15 commits into
feat/tkm-166-plugin-typesfrom
feat/tkm-167-cli

Conversation

@JustKira

@JustKira JustKira commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #257.

Summary

tokamak plugin
├── build  → artifact builder → id and output folder
├── add    → plugin-index.json ← remove
└── list   → running server's /plugins catalog

local server startup → --plugins artifacts + indexed source folders' dist

An indexed build wins a duplicate id. Missing folders and unbuilt entries are
logged and skipped. Each command shares help, exit codes, and a single JSON
result when requested. Index edits take effect at the local server's next start.

Linear: TKM-167

Evidence

  • Before: The outside fixture had no tokamak script to invoke, and the local
    server reported installed version 1.0.0 instead of indexed version 1.0.1.
  • After: The CLI suite checks both type checker formats, command help and
    JSON, index conflicts and removal, and listing across real local server
    restarts in a temporary data folder. The Rust test verifies precedence and
    startup with missing and unbuilt entries.

Local validation:

Command Result
bash .ci/check.sh lint Passed formatting, TypeScript lint, and Clippy.
bash .ci/check.sh ts Passed type checks, TypeScript tests, and the web build.
bash .ci/check.sh rust Passed workspace library tests.
cargo test -p server 162 passed; 2 real adapter tests ignored by the suite. Includes the new index startup test.
proto run bun -- e2e/run.ts Passed persistence, subscriptions, CPU interruption, and all own-machine scenarios. Run before the final lint-only cleanup.
cargo build -p server --bin tokamak-server Passed.
proto run bun -- test packages/cli/tests/cli.test.mjs 6 passed, 0 failed.

Merge Danger

Door: Two-way. The index is an optional JSON file and removing it restores
startup from --plugins alone.

Blast Radius: Startup. Only the local server reads the index; existing
servers without an index keep their plugin sources.

The shared parser rejected every flag except --json, --server and
--help, so a command could not take --errors, --out or --new. A command
now lists its flags, the parser accepts only those, and help shows
them.
@JustKira
JustKira marked this pull request as draft November 20, 2026 14:08
@JustKira
JustKira changed the base branch from feat/tkm-164-build-outside-repo to feat/tkm-166-plugin-types November 20, 2026 14:58
@JustKira

Copy link
Copy Markdown
Contributor Author

Closing without merging. The plugin shape, the server engine and sign-in are being decided again (Linear TKM-194 and TKM-195), and this work sits on top of them. Nothing is lost: the head commit is 6165ba5, and git fetch origin pull/253/head brings it back.

@JustKira JustKira closed this Nov 21, 2026
@JustKira
JustKira deleted the feat/tkm-167-cli branch November 21, 2026 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant